<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="window-target" content="_top">
    <meta http-equiv="page-enter" contect="revealTrans(duration=1.0,transtion=12)">
    <meta http-equiv="page-exit" contect="revealTrans(duration=1.0,transtion=12)">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="copyright" content="本页版权归广州中望龙腾软件股份有限公司所有。All Rights Reserved">
    <link rel="stylesheet" type="text/css" href="http://pdm.demo.jwis.cn/source/static/main.css">
</head>

<body>
    <script>
        var SIZE = 2832344;
        // var URL ='./light.z3ds';
        var URL;

        function setScript() {
            let body = document.body;
            let scriptbundle = document.createElement("script");
            scriptbundle.type = "text/javascript";
            scriptbundle.src = "http://pdm.demo.jwis.cn/source/static/bundle.js";

            let scriptconfig = document.createElement("script");
            scriptconfig.type = "text/javascript";
            scriptconfig.src = "http://pdm.demo.jwis.cn/source/static/config.js";

            body.insertBefore(scriptbundle, body.childNodes[2]);
            body.insertBefore(scriptconfig, body.childNodes[2]);
        }

        window.document.addEventListener("message", function (event) {
            var data = JSON.parse(event.data);

            switch (data.cmd) {
                case 'setUrl':
                    // 处理业务逻辑
                    console.log(data.params)
                    URL = data.params.url;
                    cadServer = data.params.cadServer;
                    setScript()
                    break;
            }
        });


    </script>
    <div id='model'></div>
    <script type="text/javascript" src='http://pdm.demo.jwis.cn/source/static/jquery.js'></script>
    <!-- <script type="text/javascript" src="./bundle.js"></script> -->
    <!-- <script type="text/javascript" src='./config.js'></script> -->
</body>
</html>